package com.luom.fsp.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.luom.fsp.model.dto.afterSalesService.AfterSalesServiceQueryRequest;
import com.luom.fsp.model.entity.AfterSalesService;
import com.luom.fsp.model.vo.AfterSalesServiceVO;

import javax.servlet.http.HttpServletRequest;

/**
 * 售后服务服务
 *
*/
public interface AfterSalesServiceService extends IService<AfterSalesService> {

    /**
     * 校验数据
     *
     * @param afterSalesService
     * @param add 对创建的数据进行校验
     */
    void validAfterSalesService(AfterSalesService afterSalesService, boolean add);

    /**
     * 获取查询条件
     *
     * @param afterSalesServiceQueryRequest
     * @return
     */
    QueryWrapper<AfterSalesService> getQueryWrapper(AfterSalesServiceQueryRequest afterSalesServiceQueryRequest);
    
    /**
     * 获取售后服务封装
     *
     * @param afterSalesService
     * @param request
     * @return
     */
    AfterSalesServiceVO getAfterSalesServiceVO(AfterSalesService afterSalesService, HttpServletRequest request);

    /**
     * 分页获取售后服务封装
     *
     * @param afterSalesServicePage
     * @param request
     * @return
     */
    Page<AfterSalesServiceVO> getAfterSalesServiceVOPage(Page<AfterSalesService> afterSalesServicePage, HttpServletRequest request);

    /**
     * 删除售后服务
     * @param id
     * @param request
     */
    void deleteAfterSalesService(Long id, HttpServletRequest request);

    /**
     * 添加售后服务
     * @param afterSalesService
     * @param request
     * @return
     */
    long addAfterSalesService(AfterSalesService afterSalesService, HttpServletRequest request);

    void cancelAfterSalesService(Long id, HttpServletRequest request);
}
